Skip to content

Conversation

@a-TODO-rov
Copy link
Contributor

see #3482

@a-TODO-rov a-TODO-rov requested a review from uglide October 23, 2025 14:13
@a-TODO-rov a-TODO-rov linked an issue Oct 23, 2025 that may be closed by this pull request
@a-TODO-rov a-TODO-rov marked this pull request as ready for review November 3, 2025 14:54
@a-TODO-rov a-TODO-rov requested review from Copilot, ggivo and tishun and removed request for ggivo, tishun and uglide November 5, 2025 15:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds support for Redis XREADGROUP CLAIM functionality, allowing the claiming of idle pending messages from a stream's Pending Entries List (PEL) with a configurable minimum idle time. The implementation introduces delivery metadata tracking for claimed entries.

  • Adds XReadArgs.claim() methods to specify minimum idle time for claiming entries
  • Introduces ClaimedStreamMessage class to carry metadata (milliseconds since last delivery and redelivery count)
  • Updates StreamReadOutput to parse optional metadata fields from Redis responses
  • Adds comprehensive unit and integration tests

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
src/main/java/io/lettuce/core/XReadArgs.java Adds claim() builder and instance methods to configure CLAIM min-idle-time parameter
src/main/java/io/lettuce/core/StreamMessage.java Adds isClaimed() method to distinguish claimed entries from fresh ones
src/main/java/io/lettuce/core/ClaimedStreamMessage.java New class extending StreamMessage to hold claim metadata (redelivery count and time since last delivery)
src/main/java/io/lettuce/core/output/StreamReadOutput.java Updates output parser to handle optional metadata fields for claimed entries in both integer and bulk string formats
src/test/java/io/lettuce/core/output/StreamReadOutputUnitTests.java Adds unit tests for parsing claimed entries with metadata in various formats
src/test/java/io/lettuce/core/XReadGroupClaimIntegrationTests.java New integration test suite validating CLAIM behavior with real Redis server

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@redis redis deleted a comment from Copilot AI Nov 7, 2025
@a-TODO-rov a-TODO-rov requested a review from tishun November 17, 2025 14:54
Copy link
Collaborator

@tishun tishun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Collaborator

@tishun tishun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it!

@uglide uglide merged commit 295546c into main Nov 19, 2025
11 checks passed
@uglide uglide deleted the xreadgorup-claim branch November 19, 2025 17:19
@a-TODO-rov a-TODO-rov added this to the 7.1.0.RELEASE milestone Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for CLAIM option on XREADGROUP

4 participants